package com.example.club.clubmanage.model;


import android.widget.Toast;

import com.example.club.clubmanage.MyApplication;

import java.io.Serializable;


/**
 * Created by chenguojun on 2018/8/16.
 */
public class BaseDto implements Serializable {
    private int ret;// 图片上传不成功  355

    private String msg;
    private Integer timestamp;
    public int getRet() {
        return ret;
    }

    public void setRet(int ret) {
        this.ret = ret;
        if(ret == 503){
            // TODO: 2018/8/7 0007
            Toast.makeText(MyApplication.application,"您的登录已失效,请重新登录",Toast.LENGTH_LONG).show();
        }
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Integer timestamp) {
        this.timestamp = timestamp;
    }

    /**
     * 设置默认OK的返回结果：ret=0 msg="ok"
     * setDefaultOkMsg
     *
     * @param
     * @return void
     * @Exception 异常对象
     */
    public void setDefaultOkMsg() {
        ret = 0;
        msg = "ok";
    }

    @Override
    public String toString() {
        return "BaseVo{" +
                "ret=" + ret +
                ", msg='" + msg + '\'' +
                ", timestamp=" + timestamp +
                '}';
    }
}
